﻿using System;
using System.Runtime.InteropServices;

namespace Vtron.HipcConfigurationTools.Domain
{
    /// <summary>
    /// 获取版本信息的应答
    /// </summary>
    /// <remarks>
    /// typedef  struct
    /// {
    ///     T_HIPC_NET_HEADER	   head;
    ///     Uint8  softVersion[3];        //软件版本
    ///     Uint8  hardVersion;        //硬件版本
    ///     Uint8  pcbaVersion;        //pcba的版本
    ///     Uint8  fpgaVersion[3];        //fpga版本
    /// } T_HIPC_SYS_VERSION_RESP;
    /// </remarks>
    [Serializable]
    [StructLayout(LayoutKind.Sequential, Pack = 1)]
    public struct T_HIPC_SYS_VERSION_RESP
    {
        #region Fields

        /// <summary>
        /// 网络协议数据头
        /// </summary>
        public T_HIPC_NET_HEADER head;

        /// <summary>
        /// 软件版本
        /// </summary>
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
        public byte[] softVersion;

        /// <summary>
        /// 硬件版本
        /// </summary>
        public byte hardVersion;

        /// <summary>
        /// pcba的版本
        /// </summary>
        public byte pcbaVersion;

        /// <summary>
        /// fpga版本
        /// </summary>
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
        public byte[] fpgaVersion;

        #endregion
    }
}
